#pragma once
#include <string>
#include <vector>
#include <iostream>
#include "../mqcommom/helper.hpp"
#include "../mqcommom/msg.pb.h"

namespace ns_rabbitmq
{
    using ConsumCallback = std::function<void(const std::string, BasicProperties *, const std::string)>;
    class Consumer
    {
    public:
    Consumer(){}
        Consumer(const std::string &tag, const std::string &qname, bool auto_delete, ConsumCallback cb)
            : _tag(tag), _qname(qname), _auto_delete(auto_delete), _cb(cb)
        {
        }
        ~Consumer() {}

        std::string _tag;   // 标签,消费者的标识
        std::string _qname; // 订阅哪一个队列
        bool _auto_delete;
        ConsumCallback _cb;
    };
    using ConsumerPtr=std::shared_ptr<Consumer>;
}